package com.example.daibanshiwu.pojo;

public class TUser {
    private static final long serialVersionUID = 1L;

    /**
     * 用户唯一ID
     */
    private Integer userId;

    /**
     * 姓名
     */
    private String name;

    /**
     * 职务
     */
    private String position;

    /**
     * 身份（区分用户和管理员），这里用字符串表示
     */
    private String role;

    /**
     * 所属部门
     */
    private String department;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 联系电话
     */
    private String phone;

    /**
     * 登录账号
     */
    private String account;

    /**
     * 密码
     */
    private String password;

    private String newPassword;

    // 无参构造函数
    public TUser() {
    }

    // 全参构造函数
    public TUser(Integer userId, String name, String position, String role, String department, String email, String phone, String account, String password,String newPassword) {
        this.userId = userId;
        this.name = name;
        this.position = position;
        this.role = role;
        this.department = department;
        this.email = email;
        this.phone = phone;
        this.account = account;
        this.password = password;
        this.newPassword = newPassword;
    }

    // --- Getter 和 Setter 方法 ---

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    // 重写 toString() 方法，方便调试时打印对象信息
    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", name='" + name + '\'' +
                ", position='" + position + '\'' +
                ", role='" + role + '\'' +
                ", department='" + department + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", account='" + account + '\'' +
                ", password='[PROTECTED]'" + // 密码不打印出来
                '}';
    }

}
